package org.opens.websocket;

import org.opens.config.ThreadPoolConfig;

/**
 * 功能描述
 *
 * @author: zhangyuming
 * @date: 2023/7/7 11:55
 */
public class TelnetClientHolderTest {

    public static void main(String[] args) throws InterruptedException {
        TelnetClientHolder telnetClientHolder = new TelnetClientHolder("192.168.1.31", 23, "12");
        telnetClientHolder.registerReadHandle(System.out::print);
        telnetClientHolder.registerWriteHandle(System.out::print);
        telnetClientHolder.connect();

        telnetClientHolder.sendCommand("telnet_user");
        telnetClientHolder.sendCommand("123456");
        telnetClientHolder.sendCommand("ls");

        telnetClientHolder.close();
    }

}
